package com.xzy.sms.entity;

import java.util.Map;

import org.apache.commons.lang3.StringUtils;

/**
 * @desc 短信发送请求实体
 * @author wjw
 * @time 2017年11月16日下午2:36:23
 */
public class SendSmsRequest {
    
    /** 应用ID */
    private String applicationId;
    
    /** FIXME */
    private String mobile;
    
    /** FIXME */
    private String content;
    
    /** FIXME */
    private String fromUser;
    
    /** FIXME */
    private String toUser;
    
    /** 如果是模板短信，这里是模板ID */
    private String templateId;
    
    /** 如果是模板短信，这里是模板Code */
    private String templateCode;
    
    /** 短信模板参数变量 */
    private Map<String, String> parameters;
    
    /** 校验时间戳 */
    private long timestamp;
    
    /** 校验字符串 */
    private String sign;
    
    /** 待校验字符串，仅在服务端使用 */
    private String rawSign;
    
    /**
     * 构造函数
     */
    public SendSmsRequest() {
        super();
    }
    
    /**
     * @return the applicationId
     */
    public String getApplicationId() {
        return applicationId;
    }
    
    /**
     * @param applicationId the applicationId to set
     */
    public void setApplicationId(String applicationId) {
        this.applicationId = applicationId;
    }
    
    /**
     * 是否是模板短信
     *
     * @return xx
     */
    public boolean isTemplate() {
        return StringUtils.isNotBlank(templateId);
    }
    
    /**
     * @return the mobile
     */
    public String getMobile() {
        return mobile;
    }
    
    /**
     * @param mobile the mobile to set
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    
    /**
     * @return the content
     */
    public String getContent() {
        return content;
    }
    
    /**
     * @param content the content to set
     */
    public void setContent(String content) {
        this.content = content;
    }
    
    /**
     * @return the fromUser
     */
    public String getFromUser() {
        return fromUser;
    }
    
    /**
     * @param fromUser the fromUser to set
     */
    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }
    
    /**
     * @return the toUser
     */
    public String getToUser() {
        return toUser;
    }
    
    /**
     * @param toUser the toUser to set
     */
    public void setToUser(String toUser) {
        this.toUser = toUser;
    }
    
    /**
     * @return the templateId
     */
    public String getTemplateId() {
        return templateId;
    }
    
    /**
     * @param templateId the templateId to set
     */
    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }
    
    /**
     * @return the parameters
     */
    public Map<String, String> getParameters() {
        return parameters;
    }
    
    /**
     * @param parameters the parameters to set
     */
    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }
    
    /**
     * @return the templateCode
     */
    public String getTemplateCode() {
        return templateCode;
    }
    
    /**
     * @param templateCode the templateCode to set
     */
    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
    
    /**
     * @return the timestamp
     */
    public long getTimestamp() {
        return timestamp;
    }
    
    /**
     * @param timestamp the timestamp to set
     */
    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
    
    /**
     * @return the sign
     */
    public String getSign() {
        return sign;
    }
    
    /**
     * @param sign the sign to set
     */
    public void setSign(String sign) {
        this.sign = sign;
    }
    
    /**
     * @return the rawSign
     */
    public String getRawSign() {
        return rawSign;
    }
    
    /**
     * @param rawSign the rawSign to set
     */
    public void setRawSign(String rawSign) {
        this.rawSign = rawSign;
    }
    
    @Override
    public String toString() {
        return "SendSmsRequest [applicationId=" + applicationId + ", mobile=" + mobile + ", content=" + content + ", fromUser=" + fromUser
            + ", toUser=" + toUser + ", templateId=" + templateId + ", templateCode=" + templateCode + ", parameters=" + parameters + ", timestamp="
            + timestamp + ", sign=" + sign + "]";
    }
    
}
